<?php
/**
 * GeryEngine
 *
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this release in the file LICENSE
 *
 * @copyright  Copyright (c) 2007 Arjen Brouwer
 * @license    New BSD License
 * @author     Arjen Brouwer
 */

class GeryInteger extends GeryBaseType {
	
	public function to_hex($val) {
		return dechex($val);	
	}
	
	public function odd($val) {
		return ($val % 2) == 1;
	}
	
	public function even($val) {
		return ($val % 2) == 0;
	}
	
	public function times($val, $parameters) {
		return str_repeat($parameters[0], $val);
	}
	
	public function to_s($val, $parameters) {
		return (string)$val;
	}
}
?>